<h2>Category List</h2>
<table cellpadding="0" cellspacing="0">
    <tr>
        <th><?php echo $paginator->sort('Name','Category.name');?></th>
        <th>Quantity</th>
        <th class="actions">Actions</th>
    </tr>
    <?php foreach ($categories as $row) :?>
        <tr>
            <td><?php echo $row['Category']['name']; ?></td>
            <td><?php echo count($row['Product']); ?></td>
            <td>
                <?php echo $html->link("edit",array('action'=>'edit',$row['Category']['id']))?>,
                <?php echo $html->link("view",array('action'=>'view',$row['Category']['id']))?>,
                <?php echo $html->link("delete",array('action'=>'delete',$row['Category']['id']),null,"Deleted?")?>
            </td>
        </tr>
    <?php endforeach;?>
</table>
<div class="paging">
    <?php echo $paginator->prev('<< Prev',array(),null,array('class'=>'disabled') )?>
    | <?php echo $paginator->numbers() ?>
    <?php echo $paginator->next('Next >>',array(),null,array('class'=>'disabled') )?>
</div>
